﻿using System;
using System.Globalization;
using System.Windows.Controls;
using System.Windows.Data;

namespace Tests.UI
{
    [ValueConversion(typeof(Orientation), typeof(Orientation))]
    public class InverseOrientationConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var orientation = (Orientation)value;
            switch (orientation)
            {
                case Orientation.Horizontal:
                    return Orientation.Vertical;
                case Orientation.Vertical:
                    return Orientation.Horizontal;
            }
            throw new NotImplementedException();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}